package com.whmskj.xjlhsc.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.whmskj.xjlhbc.core.AjaxResult;
import com.whmskj.xjlhbc.domain.ThePlanesStrappedToATable;
import com.whmskj.xjlhbc.service.IBoardService;
import com.whmskj.xjlhbc.vo.KbClVo;
import com.whmskj.xjlhbc.vo.KbSbVo;
import com.whmskj.xjlhbc.vo.KbZzcjVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@SaIgnore
@RestController
@RequestMapping("/board")
public class BoardController {

    @Autowired
    private IBoardService service;

    //织机产量数据看板
    @GetMapping("clkb")
    public AjaxResult clkb(){
        KbClVo vo = service.clkb();
        return AjaxResult.success(vo);
    }

    //纺布车间设备数据看板
    @GetMapping("sbkb")
    public AjaxResult sbkb(){
        KbSbVo vo = service.sbkb();
        return AjaxResult.success(vo);
    }

    //织机实时看台看板
    @GetMapping("ktkb")
    public AjaxResult ktkb(){
        List<ThePlanesStrappedToATable> list = service.ktkb();
        return AjaxResult.success(list);
    }


    //准整车间生产看板
    @GetMapping("zzcjkb")
    public AjaxResult zzcjkb(){
        KbZzcjVo vo = service.zzcjkb();
        return AjaxResult.success(vo);
    }

    //织布车间产耗数据看板
    @GetMapping("chkb")
    public AjaxResult chkb(){
        Object vo = service.chkb();
        return AjaxResult.success(vo);
    }

    //能耗数据看板
    @GetMapping("nhkb")
    public AjaxResult nhkb(){
        Object vo = service.nhkb();
        return AjaxResult.success(vo);
    }
}
